package com.nbsaas.sample.entity.topic;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.sample.entity.common.AbstractEntity;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;


@SearchBean(items = {
        @SearchItem(label = "发布人", name = "creatorName", key = "creator.name")
})
@ComposeView
@Data
@FormAnnotation(title = "通告管理", model = "通告", menu = "1,113")
@Entity
@Table(name = "bs_tenant_topic")
public class Topic extends AbstractEntity {


    @Comment("地址")
    private String address;

    private Double lat;

    private Double lng;

    @Comment("标题")
    private String title;


    @FormField(title = "单人费用", grid = true, col = 22)
    private BigDecimal money;

    @FormField(title = "消费价",  col = 22)
    private BigDecimal salePrice;

    @FormField(title = "招人数", grid = true, col = 22,sort = true)
    private Integer amount;

    @FormField(title = "人员性别", col = 22, type = InputType.dictionary)
    @Column(length = 10)
    private String sex;

    private Date beginDate;

    private Date endDate;


    private Long viewNum;

    @FormField(title = "投递数量", grid = true, col = 22,ignore = true)
    private Long joinNum;


    @FormField(title = "详情要求", col = 22, type = InputType.richText)
    private String note;

    @FormField(title = "群二维码", col = 22,type = InputType.image)
    private String qrCode;

    private String content;



}
